import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-03-02
 * Time: 19:32
 */
public class Area {
    public static void main(String[] args) {
        System.out.print("Enter three points for a triangle:");
        Scanner scanner = new Scanner(System.in);
        double[] point = new double[6];
        for (int i = 0;i<6;i++) {
            point[i] = scanner.nextDouble();
        }

        double s1 = Math.sqrt(Math.pow(Math.abs(point[0]-point[2]),2)+Math.pow(Math.abs(point[1]-point[3]),2));
        double s2 = Math.sqrt(Math.pow(Math.abs(point[0]-point[4]),2)+Math.pow(Math.abs(point[1]-point[5]),2));
        double s3 = Math.sqrt(Math.pow(Math.abs(point[2]-point[4]),2)+Math.pow(Math.abs(point[3]-point[5]),2));
        double s = (s1 + s2 + s3)/2;
        double area = Math.sqrt(s*(s-s1)*(s-s2)*(s-s3));
        System.out.println("The area of the triangle is "+ String.format("%.1f",area));
    }
}
